<template>
  <div class="row justify-content-center">
    <div class="col-8">
      <div v-if="userContentPraise">
        <h2 class="jh-entity-heading" data-cy="userContentPraiseDetailsHeading">
          <span v-text="$t('jhipsterserverApp.userContentPraise.detail.title')">UserContentPraise</span> {{ userContentPraise.id }}
        </h2>
        <dl class="row jh-entity-details">
          <dt>
            <span v-text="$t('jhipsterserverApp.userContentPraise.praiseTime')">Praise Time</span>
          </dt>
          <dd>
            <span v-if="userContentPraise.praiseTime">{{ $d(Date.parse(userContentPraise.praiseTime), 'long') }}</span>
          </dd>
          <dt>
            <span v-text="$t('jhipsterserverApp.userContentPraise.account')">Account</span>
          </dt>
          <dd>
            <div v-if="userContentPraise.account">
              <router-link :to="{ name: 'UserAccountView', params: { userAccountId: userContentPraise.account.id } }">{{
                userContentPraise.account.id
              }}</router-link>
            </div>
          </dd>
          <dt>
            <span v-text="$t('jhipsterserverApp.userContentPraise.content')">Content</span>
          </dt>
          <dd>
            <div v-if="userContentPraise.content">
              <router-link :to="{ name: 'ContentInfoView', params: { contentInfoId: userContentPraise.content.id } }">{{
                userContentPraise.content.id
              }}</router-link>
            </div>
          </dd>
        </dl>
        <button type="submit" v-on:click.prevent="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">
          <font-awesome-icon icon="arrow-left"></font-awesome-icon>&nbsp;<span v-text="$t('entity.action.back')"> Back</span>
        </button>
        <router-link
          v-if="userContentPraise.id"
          :to="{ name: 'UserContentPraiseEdit', params: { userContentPraiseId: userContentPraise.id } }"
          custom
          v-slot="{ navigate }"
        >
          <button @click="navigate" class="btn btn-primary">
            <font-awesome-icon icon="pencil-alt"></font-awesome-icon>&nbsp;<span v-text="$t('entity.action.edit')"> Edit</span>
          </button>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script lang="ts" src="./user-content-praise-details.component.ts"></script>
